package com.hb.trade.server.project.section.service.raw;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hb.core.pojo.project.section.dto.BidSectionOfferDTO;
import com.hb.core.pojo.project.section.dto.BidSectionOfferListDTO;
import com.hb.core.pojo.project.section.entity.BidSectionOffer;
import com.hb.core.pojo.project.section.dto.SectionOfferSearchDTO;
import net.bytebuddy.description.field.FieldDescription;

import java.util.List;

/**
 * <p>
 * 供应商标段报价表 服务类
 * </p>
 *
 * @author zhaojk
 * @since 2021-10-13
 */
public interface BidSectionOfferService extends IService<BidSectionOffer> {

    /**
     * 获取最后一次报价的轮次
     *
     * @param offerId   投标人ID
     * @param sectionId 标段ID
     * @return
     */
    Integer getLastOffer(Long offerId, Long sectionId);
    /**
     * 获取最后一次报价的金额
     *
     * @param offerId   投标人ID
     * @param sectionId 标段ID
     * @return
     */
    String getLastOfferParamValue(Long offerId, Long sectionId);

    /**
     * 获取标段下的轮次
     *
     * @param sectionId 标段ID
     * @return
     */

    List<Integer> getOfferOrder(Long sectionId);

    /**
     * 获取指定标段指定供应商的报价明细
     */
    List<BidSectionOfferListDTO> listOfferByTender(SectionOfferSearchDTO sectionOfferSearch);

    /**
     * 根据查询条件查询报价列表
     *
     * @param sectionOfferSearch 查询VO
     * @return 报价列表
     */
    List<BidSectionOffer> getOfferList(SectionOfferSearchDTO sectionOfferSearch);



    /**
     * 根据轮次和投标人id及标段id获取上一轮报价
     *
     * @param offerId   投标人ID
     * @param sectionId 标段ID
     * @return
     */
  BidSectionOffer getLastBidSectionOffer(Integer turns,Long offerId, Long sectionId);

    /**
     * Description: 供应商提交报价
     *
     * @param bidSectionOffer
     * @author: fengbin
     * @date: 2022/2/21 17:23
     * @return: java.lang.Boolean
     */
    Boolean legalSubmit(BidSectionOfferDTO bidSectionOffer);

    /**
     * Description: 根据轮次和标段iD查询企业报价信息
     *
     * @param turns
     * @param sectionId
     * @author: fengbin
     * @date: 2022/2/21 21:34
     * @return: java.util.List<com.hb.core.pojo.project.section.dto.BidSectionOfferDTO>
     */
    List<BidSectionOfferDTO> listOfferInfosByturns(Integer turns, Long sectionId);

    /**
     * Description:  获取投标人报价列表
     *
     * @param offerId
     * @param sectionId
     * @author: fengbin
     * @date: 2022/2/22 10:33
     * @return: java.util.List<com.hb.core.pojo.project.section.dto.BidSectionOfferDTO>
     */
    List<BidSectionOfferDTO> listOfferInfosByOffId(Long offerId, Long sectionId);

    /**
    * Description: 根据投标人id 及 轮次 修改专家意见
    * @author: fengbin
    * @date: 2022/2/23 10:30
    * @param bidSectionOffer
     @return: java.lang.Boolean
    */
    Boolean updataExpertOpinionByOfferId(BidSectionOfferDTO bidSectionOffer);




}
